﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class LichLamViecBUS
    {
        public static List<LichLamViecDTO> Select_NhanVien_not_exists_in_CaLamViec_Ngay(int MaCaLamViec, string Ngay)
        {
            return LichLamViecDAO.Select_NhanVien_not_exists_in_CaLamViec_Ngay(MaCaLamViec, Ngay);
        }

        public static bool Insert(LichLamViecDTO llv)
        {
            try
            {
                return LichLamViecDAO.Insert(llv);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static bool Delete(int MaLLV)
        {
            try
            {
                return LichLamViecDAO.Delete(MaLLV);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static List<LichLamViecDTO> Select_by_CaLamViec_Ngay(int MaCaLamViec, string Ngay)
        {
            return LichLamViecDAO.Select_by_CaLamViec_Ngay(MaCaLamViec,Ngay);
        }

        public static List<LichLamViecDTO> Select_by_TenNhanVien(string TenNhanVien)
        {
            return LichLamViecDAO.Select_by_TenNhanVien(TenNhanVien);
        }

        public static bool Update(LichLamViecDTO llv)
        {
            try
            {
                return LichLamViecDAO.Update(llv);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static List<LichLamViecDTO> KiemTraNgayDoNhanVienCoLamHayKhong(string Ngay,int MaNhanVien)
        {
            return LichLamViecDAO.KiemTraNgayDoNhanVienCoLamHayKhong(Ngay, MaNhanVien);
        }
    }
}
